package com.jumi.microservice.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumi.microservice.dto.reponse.FenXiaoReponse;
import com.jumi.microservice.entity.CommonGroup;
import com.jumi.microservice.entity.JmUserFenxiao;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;


/**
 * <p>
 * 用户收益表 服务类
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-07-14
 */
public interface IJmUserFenxiaoService extends IService<JmUserFenxiao>, PageService  {

    /**
     * 获得总收益
     * @param wrapper
     * @return
     */
    BigDecimal getSumYongJin(Wrapper wrapper);


    /**
     * 根据类型统计佣金
     */
    List<CommonGroup> getSumYongJinByType(Wrapper wrapper);

    /**
     * 内部调用的查询接口,根据查询条件统计总收益
     * @param wrapper
     * @return
     */
    List<FenXiaoReponse> getSumYongJinByColumn(Wrapper wrapper);

    Page getFenXiaoDetail(Page page, QueryWrapper wrapper);
}
